package com.hsmpay.mobile.action.account.qian48;

import com.hsmpay.common.pojo.qian4.Qian4SendLog;
import com.hsmpay.common.pojo.user.User;
import com.hsmpay.common.util.DateConvertUtil;
import com.hsmpay.common.util.URLDecoderTools;
import com.hsmpay.mobile.action.account.fc.PurchaseBaseAction;
import com.hsmpay.mobile.pojo.bank.BankCode;
import com.hsmpay.mobile.pojo.terminal.TerminalPrivileges;
import com.hsmpay.mobile.pojo.trans.TransOrder;
import com.hsmpay.mobile.pojo.trans.TransPriorSettle;
import com.hsmpay.mobile.service.bank.BankCodeService;
import com.hsmpay.mobile.service.zytl.ZYTLParamService;
import com.hsmpay.mobile.util.icc.ME30DataDecode;
import com.hsmpay.qian4.pojo.FeeResult;
import com.hsmpay.qian4.pojo.PurchaseResult;
import com.hsmpay.qian4.service.ds.impl.ZYTLPayServiceImpl;
import com.hsmpay.utils.TimeUtils;
import net.sf.json.JSONObject;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;
import java.net.ConnectException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 千48 信用卡还款action
 *
 * @author 颜铃璋
 * @date 2013-8-27
 */
@Controller("q4CreditRepaymentAction")
@Scope("prototype")
public class Q4CreditRepaymentAction extends Q4BaseAction {
    private static final long serialVersionUID = -6685556721396542845L;
    private static Logger log = Logger.getLogger(Q4CreditRepaymentAction.class);
    @Resource(name = "bankCodeService")
    BankCodeService<BankCode, Long> bankCodeService;
    public static final String CHECKCREDIT_FUNCKEY = "CREDITCARDREPAYMENT";

    /**
     * 信用卡还款
     *
     * @return
     * @throws Exception
     */
    public String creditRepayment() throws Exception {
        log.debug("--- creditRepayment() start ---");
        JSONObject js = JSONObject.fromObject(getRequest().getAttribute(FC_DATA));
        roleId = Long.parseLong(getJsonString("roleId"));
        clientType = Integer.parseInt(getJsonString("clientType"));
        terminalTypeId = Long.parseLong(js.getString("terminalTypeId"));
        userId = Long.parseLong(getJsonString("userId"));
        functionKey = getJsonString("functionKey");
        merchantOrderId = getJsonString("merchantOrderId");
        merchantOrderTime = getJsonString("merchantOrderTime");
        terminalId = getJsonString("terminalId");
        transAmt = getJsonString("transAmt");
        accountNumber = getJsonString("accountNumber");
        pin = getJsonString("pin");
        track2Data = getJsonString("track2Data");
        track3Data = getJsonString("track3Data");
        creditNumber = getJsonString("creditNumber");
        dynamicKeyData = getJsonString("dynamicKeyData");
        senderSign = getJsonString("senderSign");
        serviceInfo = getJsonString("serviceInfo");
        terminalInfo = getJsonString("terminalInfo");
        mac = getJsonString("mac");
        encryType = getJsonString("encryType");
        icCardYu = getJsonString("icCardYu");
        Integer isNew = StringUtils.isEmpty(getJsonString("isNew")) ? 0 : Integer.parseInt(getJsonString("isNew"));
        String isNeedNameId = getJsonString("isNeedNameId");
        String idCard = getJsonString("idCard");
        String purchaseName = getJsonString("purchaseName");

        log.debug("userId = " + userId);//用户ID
        log.debug("functionKey = " + functionKey);//用户ID
        log.debug("clientType = " + clientType);//
        log.debug("terminalTypeId = " + terminalTypeId);//

        log.debug("merchantOrderId = " + merchantOrderId);//商户订单
        log.debug("merchantOrderTime = " + merchantOrderTime);//商户订单时间
        log.debug("terminalId = " + terminalId);//终端代码
        //log.debug("transId = " + transId);//交易流水号
        log.debug("transAmt = " + transAmt);//交易金额
        log.debug("accountNumber = " + accountNumber);//主账户
        log.debug("pin = " + pin);//个人身份标识码
        log.debug("track2Data = " + track2Data);//磁道2数据
        log.debug("track3Data = " + track3Data);//磁道3数据
        log.debug("creditNumber = " + creditNumber);//信用卡卡号
        log.debug("dynamicKeyData = " + dynamicKeyData);//动态密钥数据

        log.debug("senderSign = " + senderSign);//发送方数字签名
        log.debug("serviceInfo = " + serviceInfo);//服务信息
        log.debug("terminalInfo = " + terminalInfo);//终端信息 手机串号、号码、os、序列号等
        log.debug("mac" + mac);
        if (null == userId) {
            log.warn("信用卡还款时, 传入参数userId为空");
            sendAppErrorMsg("6001", "userId");
            return null;
        }
        if (StringUtils.isBlank(functionKey)) {
            log.warn("信用卡还款时, 传入参数functionKey为空");
            sendAppErrorMsg("6001", "functionKey");
            return null;
        }
        if (StringUtils.isBlank(merchantOrderId)) {
            log.warn("信用卡还款时, 传入参数merchantOrderId为空");
            sendAppErrorMsg("6001", "merchantOrderId");
            return null;
        }
        if (StringUtils.isBlank(merchantOrderTime)) {
            log.warn("信用卡还款时, 传入参数merchantOrderTime为空");
            sendAppErrorMsg("6001", "merchantOrderTime");
            return null;
        }
        if (null == transAmt) {
            log.warn("信用卡还款时, 传入参数transAmt为空");
            sendAppErrorMsg("6001", "transAmt");
            return null;
        }
        if (StringUtils.isBlank(accountNumber)) {
            log.warn("信用卡还款时, 传入参数accountNumber为空");
            sendAppErrorMsg("6001", "accountNumber");
            return null;
        }
        if (StringUtils.isBlank(pin)) {
            log.warn("信用卡还款时, 传入参数pin为空");
            sendAppErrorMsg("6001", "pin");
            return null;
        }
        if (StringUtils.isBlank(track2Data)) {
            log.warn("信用卡还款时, 传入参数track2Data为空");
            sendAppErrorMsg("6001", "track2Data");
            return null;
        }
        /*if (StringUtils.isBlank(track3Data)) {
			log.warn("信用卡还款时, 传入参数track3Data为空");
			sendAppErrorMsg("6001", "track3Data");
			return null;
		}*/
        if (StringUtils.isBlank(creditNumber)) {
            log.warn("信用卡还款时, 传入参数creditNumber为空");
            sendAppErrorMsg("6001", "creditNumber");
            return null;
        }
        if (1 == isNew) {
            if (StringUtils.isBlank(isNeedNameId)) {
                log.warn("信用卡还款时, 传入参数isNeedNameId为空");
                sendAppErrorMsg("6001", "isNeedNameId");
                return null;
            }
            if ("1".equals(isNeedNameId)) {
                if (StringUtils.isBlank(idCard)) {
                    log.warn("信用卡还款时, 传入参数idCard为空");
                    sendAppErrorMsg("6001", "idCard");
                    return null;
                }
                if (StringUtils.isBlank(purchaseName)) {
                    log.warn("信用卡还款时, 传入参数userName为空");
                    sendAppErrorMsg("6001", "userName");
                    return null;
                }
            }
        }

        Map<String, Object> result = null;
        User user = null;
        Qian4SendLog send = null;
        TransOrder transOrder = null;
        TransPriorSettle transPriorSettle = null;
        try {
            functionKey = CHECKCREDIT_FUNCKEY;
            if (!checkPIV(functionKey)) {
                log.warn("信用卡还款时, 银行接口暂停使用！");
                //sendAjaxResponse("-2");
                return null;
            }

            //屏蔽伪卡
            if (transRefuseCardService.isRefuseCard(accountNumber)) {
                sendAppErrorMsg("6073", accountNumber);
                return null;
            }

            if ("1".equals(encryType)) {
                track2Data = ME30DataDecode.decryptTrace2(track2Data);
                //icCardYu.replace(oldChar, newChar)
            } else if ("2".equals(encryType)) {
                String trackOData = getJsonString("trackOData");
                String[] trackA = ME30DataDecode.decryptTrace2_aic(trackOData, track2Data);
                track2Data = trackA[0];
                track3Data = trackA[1];
            }
            track2Data = track2Data.replaceAll("F", "");//屏蔽二磁道有F的情况

            result = new HashMap<String, Object>();
            user = userService.getUserById(userId);
            if (null != user) {
                User user1=new User();
                user1.setId(userId);
                user1.setDeleted(0);
                user= userService.searchEntity(user1);
                if(user==null){
                    Map<String, Object> resMap = new HashMap<String, Object>();
                    log.warn("信用卡还款时, 用户Id=" + userId + " 对应的用户不存在!");
                    resMap.put("reqCode", "6004");
                    resMap.put("reqMsg", "用户："+userId+ " 该用户被销户或暂停使用！");
                    resMap.put("channelId", "");
                    sendAppMsg(resMap);
                    return null;
                }
                //判断日期是否是今天
                Date date = new Date();
                String today = DateConvertUtil.dateString(date, "yyyyMMdd");//
                if (!merchantOrderTime.startsWith(today)) {
                    merchantOrderId = getMerchantOrderId(date, user.getLoginName());
                    merchantOrderTime = DateConvertUtil.dateString(date, "yyyyMMddHHmmss");
                }

                //查出商户订单号 是否存在
                System.out.println(user.getLoginName()+" #### "+merchantOrderId);
                transOrder = transOrderService.searchOrderByMerchantOrderId(user.getLoginName(), merchantOrderId);
                if (null != transOrder) {
                    sendAppErrorMsg("6101", merchantOrderId);
                    return null;
                }

                TerminalPrivileges tp = terminalPrivilegesService.searchPrivilegesByFunctionKey(CHECKCREDIT_FUNCKEY);
                Integer channelCode = tp.getTchannel().intValue();
                if (null == channelCode){
                    channelCode = PurchaseBaseAction.TC_ZHONGYI;
                }

                send = new Qian4SendLog();

                send.setCallType(0);
                send.setRoleId(roleId);
                send.setUserId(userId);
                send.setOrderTypeId(CREDIT_REPAYMENT);
                send.setApplication("CreditRepayment.Req");
                send.setTransType("100002");//
                send.setSendTime(date);
                send.setSendSeqId(TimeUtils.getTimeToString());
                send.setTerminalId(terminalId);
                send.setPlatformId(platformId);

                send.setMerchantOrderId(merchantOrderId);//## 商户订单号
                send.setMerchantOrderTime(DateConvertUtil.stringDate(merchantOrderTime, "yyyyMMddHHmmss"));
                send.setTransTime(send.getSendTime());
                send.setCurrency("156");
                send.setTransAmt(transAmt);

                send.setAccountNumber(accountNumber);
                send.setPin(pin);
                send.setTrack2Data(track2Data);
                send.setTrack3Data(track3Data);
                send.setCreditNumber(creditNumber);//信用卡卡号
                send.setDynamicKeyData(dynamicKeyData);

                send.setSenderSign(senderSign);
                send.setServiceInfo(serviceInfo);
                send.setTerminalInfo(terminalInfo);
                send.setMac(mac);
                send.setCollectionType(channelCode);
                send.setIp(URLDecoderTools.getRemoteHost(getRequest()));//IP
                send.setIcCardYu(icCardYu);
                send.setCardTypeN(StringUtils.isEmpty(icCardYu) ? 1 : 2);//1 磁条卡 2 IC卡
                send.setIsNeedNameId(("1".equals(isNeedNameId) ? 1 : 0));
                send.setIdCard(idCard);
                send.setIsNew(isNew);
                send.setPurchaseName(purchaseName);

                //查询手续费
                double money = Double.parseDouble(transAmt) / 100;
                double fee = 0.0;
                //查出信用卡 所属银行
                String creditBankName = bankCodeService.searchBankNameByCard(creditNumber);
                if (!checkCreditBankName(creditBankName)) {
                    sendAppErrorMsg("6067", creditNumber);
                    return null;
                }
                switch (channelCode) {
                    case PurchaseBaseAction.TC_ZHONGYI:
                        FeeResult fr = getZYFee(creditNumber, transAmt,roleId);
                        if (!"0000".equals(fr.getReqCode())) {
                            sendAppErrorMsg("6068", fr.getReqMsg());
                            return null;
                        }
                        fee = Double.valueOf(fr.getFee());
                        break;
                }
                send.setFee((int) (fee * 100) + "");

                //组装 订单数据
                transOrder = new TransOrder();
                transOrder.setOrderNum(getOrderNumByDate(date));
                transOrder.setOrderTypeId(CREDIT_REPAYMENT);//信用卡还款
                transOrder.setUserId(userId);
                transOrder.setPUserId(user.getPUserId());//父用户Id
                transOrder.setTransMoney(money);
                transOrder.setFeeMoney(fee);//手续费
                transOrder.setChargeAmount(money + transOrder.getFeeMoney());
                transOrder.setRootCategory("账务管理");
                transOrder.setCategory("信用卡还款");
                //transOrder.setName(userName);//收款方
                transOrder.setBankCard(accountNumber);
                //transOrder.setOpeningBank(openingBank);
                //transOrder.setObjectiveName(StringUtils.isBlank(user.getCardholder()) ? user.getUserName() : user.getCardholder());//user.getUserName());//对方持卡人姓名
                transOrder.setObjectiveCard(creditNumber);//对方银行卡
                //transOrder.setObjectiveOpBank(user.getOpeningBank());//对方银行
                transOrder.setStatus(3);//交易状态  0交易失败 1交易成功 2银行交易处理中 3 未付款 4等待对方付款5关闭交易
                transOrder.setClearing(0);//结算状态 0未结算 1结算
                //transOrder.setDescription(description);//交易详情
                transOrder.setCreateDate(date);
                transOrder.setUpdateLongTime(date.getTime());

                transOrder.setBrokerage(0.0000);
                transOrder.setDealerBrokerage(0.0000);
                transOrder.setTerminalTypeId(terminalTypeId);
                transOrder.setRoleId(roleId);
                transOrder.setFeeRate(0.00);//用户费率
                transOrder.setFdMaxFee(0.00);//用户封顶最高
                transOrder.setFdMinFee(0.00);//用户封顶最低
                transOrder.setCardTypeN(send.getCardTypeN());//1 磁条卡 2 IC卡
                transOrder.setName(purchaseName);//出帐姓名
                transOrder.setIdCard(idCard);//出帐身份证
                transOrder.setClientType(clientType);//客户端类型
                //添加 日志
//                qian4SendLogService.insertEntity(send);
                //下单 并保存发送数据
                transPriorSettle = accountManageQ4Service.advanceOrder(transOrder, send, 1);
                PurchaseResult pr = null;

                switch (channelCode) {
                    case PurchaseBaseAction.TC_ZHONGYI:
                        pr = ds_zytlPayService.creditRepayment(send);
                        break;

                }
                if (0 == pr.getStatus()) {//错误
                    log.debug("信用卡还款失败");
                    result.put("bankResp", "0");
                    result.put("reqCode", pr.getReqCode());
                    result.put("reqMsg", pr.getReqMsg());
                    accountManageQ4Service.receivablesError(transPriorSettle, pr.getReqCode(), pr.getReqMsg());
                    qian4SendLogService.updateResCodeMassage(transPriorSettle.getSendId(), pr.getReqCode(), pr.getReqMsg());
                } else {
                    transPriorSettle = accountManageQ4Service.purchaseResolveResult(transPriorSettle, send, pr, null, user.getOrganizationId());
                    result.put("reqCode", transPriorSettle.getResponseCode());
                    if (StringUtils.isNotBlank(transPriorSettle.getBankMessage()))
                        result.put("reqMsg", transPriorSettle.getBankMessage());

                    qian4SendLogService.updateResCodeMassage(send.getId(), transPriorSettle.getResponseCode(), transPriorSettle.getBankMessage());

                    //用接口调用  需要返回
                    result.put("orderNum", transOrder.getOrderNum());
                    result.put("transTime", DateConvertUtil.dateString(transPriorSettle.getCreateDate(), "HH:mm:ss"));//交易时间
                    result.put("accountNumber", send.getAccountNumber());//
                    result.put("creditNumber", send.getCreditNumber());
                    result.put("batchId", transPriorSettle.getBatchId());//批次号
                    result.put("searchId", transPriorSettle.getSearchId());//查询号
                    result.put("authNum", transPriorSettle.getAuthorizationCode());//授权号
                    result.put("refId", transPriorSettle.getBankRef());//参考和
                    result.put("issueBank", transPriorSettle.getIssueBank());//发卡行名称
                    result.put("cardType", transPriorSettle.getCardType());//卡类别
                    result.put("expireDate", transPriorSettle.getExpireDate());//有效期
                }
                sendAppMsg(result);
                
            } else {
                log.warn("信用卡还款时, 用户Id=" + userId + " 对应的用户不存在!");
                sendAppErrorMsg("6012", userId + "");
            }
        } catch (ConnectException e) {//请求 超时

        } catch (Exception e) {
            e.printStackTrace();
            throw e;
        } finally {
            user = null;
            send = null;
            transOrder = null;
            transPriorSettle = null;
            result = null;
        }
        return null;
    }

    /**
     * 检测 信用卡 是否可用
     *
     * @return
     * @throws Exception
     */
    public void checkCreditBankCard() throws Exception {
        log.debug("--- checkCreditBankCard() start ---");
        roleId = Long.parseLong(getJsonString("roleId"));
        clientType = Integer.parseInt(getJsonString("clientType"));
        terminalTypeId = Long.parseLong(getJsonString("terminalTypeId"));
        userId = Long.parseLong(getJsonString("userId"));
        functionKey = getJsonString("functionKey");
        creditNumber = getJsonString("creditNumber");
        transAmt = getJsonString("transAmt");
        String isNew = getJsonString("isNew");
        if (null == userId) {
            log.warn("信用卡还款时, 传入参数userId为空");
            sendAppErrorMsg("6001", "userId");
            return;
        }
        if (StringUtils.isBlank(functionKey)) {
            log.warn("信用卡还款时, 传入参数functionKey为空");
            sendAppErrorMsg("6001", "functionKey");
            return;
        }
        if (StringUtils.isEmpty(creditNumber)) {
            log.warn("信用卡还款时, 传入参数creditNumber为空");
            sendAppErrorMsg("6001", "creditNumber");
            return;
        }
        if ("1".equals(isNew)) {
            if (StringUtils.isEmpty(transAmt)) {
                log.warn("信用卡还款时, 传入参数transAmt为空");
                sendAppErrorMsg("6001", "transAmt");
                return;
            }
        }
        try {
            functionKey = CHECKCREDIT_FUNCKEY;
            if (!checkPIV(functionKey)) {
                log.warn("信用卡还款时, 银行接口暂停使用！");
                return;
            }

            //屏蔽伪卡
            if (transRefuseCardService.isRefuseCard(creditNumber)) {
                sendAppErrorMsg("6073", creditNumber);
                return;
            }

            TerminalPrivileges tp = terminalPrivilegesService.searchPrivilegesByFunctionKey(CHECKCREDIT_FUNCKEY);
            Integer channelCode = tp.getTchannel().intValue();
            if (null == channelCode){
                channelCode = PurchaseBaseAction.TC_ZHONGYI;
            }

            String creditBankName = bankCodeService.searchBankNameByCard(creditNumber);
            if (!checkCreditBankName(creditBankName)) {
                sendAppErrorMsg("6067", creditNumber);
                return;
            }

            Map<String, Object> result = new HashMap<String, Object>();
            switch (channelCode) {
                case PurchaseBaseAction.TC_ZHONGYI:
                    FeeResult fr = getZYFee(creditNumber, transAmt,roleId);
                    result.put("reqCode", fr.getReqCode());
                    result.put("reqMsg", fr.getReqMsg());
                    result.put("fee", StringUtils.isEmpty(fr.getFee()) ? "0" : fr.getFee());
                    result.put("isNeedNameId", StringUtils.isEmpty(fr.getIsNeedNameID()) ? "0" : fr.getIsNeedNameID());
                    break;
            }
            sendAppMsg(result);
        } catch (Exception e) {
            e.printStackTrace();
            throw e;
        }
    }

    /**
     * 中亿通道查询交易手续费
     *
     * @param creditNumber
     * @param transAmt
     * @return
     * @throws Exception
     */
    public FeeResult getZYFee(String creditNumber, String transAmt, long roleId) throws Exception {
        FeeResult fr = ds_zytlPayService.checkCreditBankCard(creditNumber, transAmt,roleId);
        return fr;
    }

    private static Double checkFee(String creditBankName) {
        Double fee = feeMap.get(creditBankName);
        if (null == fee) {
            String[] feeArray = creditBankName.split("银行");
            if (feeArray.length >= 2) creditBankName = feeArray[0] + "银行";
            fee = feeMap.get(creditBankName);
        }
        if (null == fee) {
            creditBankName = creditBankName.replaceAll("银行", "");
            fee = feeMap.get(creditBankName);
        }
        return fee;
    }

    /**
     * 检查是否支持信用卡还款
     *
     * @param creditBankName
     * @return
     */
    private static boolean checkCreditBankName(String creditBankName) {
        boolean result = false;
        Double fee = checkFee(creditBankName);
        if (fee != null) {
            result = true;
        }
        return result;
    }


    private static Map<String, Double> feeMap = new HashMap<String, Double>();
    private static Map<String, String> daoZhangMap = new HashMap<String, String>();

    static {
        feeMap.put("中国银行", 3.0);
        feeMap.put("农业银行", 0.0);
        feeMap.put("工商银行", 3.0);
        feeMap.put("建设银行", 3.0);
        feeMap.put("交通银行", 3.0);
        feeMap.put("招商银行", 0.0);
        feeMap.put("中信银行", 0.0);
        feeMap.put("浦发银行", 0.0);
        feeMap.put("兴业银行", 0.0);
        feeMap.put("民生银行", 0.0);
        feeMap.put("光大银行", 0.0);
        feeMap.put("平安银行", 0.0);
        feeMap.put("华夏银行", 0.0);
        feeMap.put("北京银行", 2.0);
        feeMap.put("广发银行", 0.0);
        feeMap.put("上海银行", 0.0);
        feeMap.put("江苏银行", 0.0);
        feeMap.put("北京农商行", 3.0);
        feeMap.put("重庆农商行", 0.0);
        feeMap.put("上海农商行", 0.0);
        feeMap.put("南京银行", 0.0);
        feeMap.put("广州银行", 0.0);
        feeMap.put("宁波银行", 0.0);
        feeMap.put("徽商银行", 0.0);
        feeMap.put("盛京银行", 0.0);
        feeMap.put("哈尔滨银行", 0.0);
        feeMap.put("大连银行", 0.0);
        feeMap.put("成都农商行", 0.0);
        feeMap.put("包商银行", 0.0);
        feeMap.put("东亚银行", 0.0);
        feeMap.put("台州商行", 0.0);
        feeMap.put("浙江泰隆银行", 0.0);
        feeMap.put("重庆银行", 0.0);
        feeMap.put("广东南粤银行", 0.0);
        feeMap.put("温州银行", 0.0);
        feeMap.put("青岛银行", 0.0);
        feeMap.put("乌鲁木齐银行", 0.0);
        feeMap.put("福建农信社", 0.0);
        feeMap.put("青海银行", 0.0);
        feeMap.put("青海省农村信用社联合社", 0.0);
        feeMap.put("鄞州农村合作银行", 0.0);
        feeMap.put("浙江稠州商业银行", 0.0);
        feeMap.put("绍兴银行", 0.0);
        feeMap.put("内蒙古银行", 0.0);
        feeMap.put("浙江民泰商业银行", 0.0);
        feeMap.put("珠海华润银行", 0.0);
        feeMap.put("长沙银行", 0.0);
        feeMap.put("宁夏银行", 0.0);
        feeMap.put("渣打银行", 0.0);
        feeMap.put("南充商业银行", 0.0);
        feeMap.put("陕西农信社", 0.0);
        feeMap.put("花旗银行", 0.0);
        feeMap.put("南洋商业银行", 0.0);

        daoZhangMap.put("中国银行", "T+2工作日");//T+2 工作日内到账
        daoZhangMap.put("农业银行", "T+1工作日");//T+1 工作日内到账
        daoZhangMap.put("工商银行", "T+2工作日");//T+2 工作日内到账
        daoZhangMap.put("建设银行", "T+2工作日");//T+2 工作日内到账
        daoZhangMap.put("交通银行", "T+2工作日");//T+2 工作日内到账
        daoZhangMap.put("招商银行", "T+0");//T+0 工作日内到账
        daoZhangMap.put("中信银行", "T+0");//T+0 工作日内到账
        daoZhangMap.put("浦发银行", "T+1个自然日");//T+1 工作日内到账
        daoZhangMap.put("浦发银行", "T+1个自然日");//T+1 工作日内到账
        daoZhangMap.put("民生银行", "T+0");
        daoZhangMap.put("光大银行", "T+0");
        daoZhangMap.put("平安银行", "T+1工作日");
        daoZhangMap.put("华夏银行", "T+1个自然日");
        daoZhangMap.put("北京银行", "T+0");
        daoZhangMap.put("广发银行", "T+0");
        daoZhangMap.put("上海银行", "T+0");
        daoZhangMap.put("江苏银行", "T+0");
        daoZhangMap.put("北京农商行", "T+0");
        daoZhangMap.put("重庆农商行", "T+0");
        daoZhangMap.put("上海农商行", "T+0");
        daoZhangMap.put("南京银行", "T+0");
        daoZhangMap.put("广州银行", "T+0");
        daoZhangMap.put("宁波银行", "T+0");
        daoZhangMap.put("徽商银行", "T+0");
        daoZhangMap.put("盛京银行", "T+0");
        daoZhangMap.put("哈尔滨银行", "T+0");
        daoZhangMap.put("大连银行", "T+1个自然日");
        daoZhangMap.put("成都农商行", "T+0");
        daoZhangMap.put("包商银行", "T+0");
        daoZhangMap.put("东亚银行", "T+1工作日");
        daoZhangMap.put("台州商行", "T+1工作日");
        daoZhangMap.put("浙江泰隆银行", "T+0");
        daoZhangMap.put("重庆银行", "T+0");
        daoZhangMap.put("广东南粤银行", "T+0");
        daoZhangMap.put("温州银行", "T+0");
        daoZhangMap.put("青岛银行", "T+0");
        daoZhangMap.put("乌鲁木齐银行", "T+0");
        daoZhangMap.put("福建农信社", "T+0");
        daoZhangMap.put("青海银行", "T+0");
        daoZhangMap.put("青海省农村信用社联合社", "T+0");
        daoZhangMap.put("鄞州农村合作银行", "T+0");
        daoZhangMap.put("浙江稠州商业银行", "T+0");
        daoZhangMap.put("绍兴银行", "T+0");
        daoZhangMap.put("内蒙古银行", "T+0");
        daoZhangMap.put("浙江民泰商业银行", "T+0");
        daoZhangMap.put("珠海华润银行", "T+0");
        daoZhangMap.put("长沙银行", "T+0");
        daoZhangMap.put("宁夏银行", "T+0");
        daoZhangMap.put("渣打银行", "T+0");
        daoZhangMap.put("南充商业银行", "T+0");
        daoZhangMap.put("陕西农信社", "T+0");
        daoZhangMap.put("花旗银行", "T+2");
        daoZhangMap.put("南洋商业银行", "T+2");
    }

}
